package day12.dat12;



import java.util.TreeSet;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:TreeSetDemo
 * @date 2019/7/30 0030
 */
public class TreeSetDemo {
    public static void main(String[] args) {
      Book b1 = new Book(1,"西a游记","吴承恩",100.0);
      Book b2 = new Book(2,"水浒传","施耐庵",150.0);
      Book b3 = new Book(3,"红a楼梦","曹雪芹",80.0);
      Book b4 = new Book(4,"三国演义","罗贯中",70.0);
      Book b5 = new Book(5,"等a一个人的咖啡","九把刀",120.0);
      Book b6 = new Book(6,"毛泽东讲义","毛润之",120.0);

        TreeSet<Book> books = new TreeSet<>();
        books.add(b1);
        books.add(b2);
        books.add(b3);
        books.add(b4);
        books.add(b5);
        books.add(b6);

        books.forEach(System.out::println);
    }
}
